Fix behavior of f and t in evil operator map
authorJustin Burkett <justin@burkett.cc>
Tue, 22 May 2018 14:11:15 +0000 (10:11 -0400)
committerJustin Burkett <justin@burkett.cc>
Tue, 22 May 2018 14:11:15 +0000 (10:11 -0400)
f and t (also F and T) read characters manually, so the popup should not be
shown after these commands. This only applies if
which-key-show-operator-state-maps is non-nil.

Fixes #191

which-key.el

index 1a4212f4fb9540f9426159b9dc3e3ca97aa690c6..c6b89baf934930a9cb56ed952064b580efee453f 100644 (file)
@@ -2451,8 +2451,8 @@ is selected interactively by mode in `minor-mode-map-alist'."
                           nil "evil operator/motion keys"))
                    (which-key--show-page)))))
       (let* ((key (key-description (list (read-key)))))
-        (when (string= key "`")
-          ;; evil-goto-mark reads the next char manually
+        (when (member key '("f" "F" "t" "T" "`"))
+          ;; these keys trigger commands that read the next char manually
           (setq which-key--inhibit-next-operator-popup t))
         (cond ((and which-key-use-C-h-commands (string= "C-h" key))
                (which-key-C-h-dispatch))